package sy.pageModel;

import java.util.LinkedHashMap;
import java.util.Map;

public class Member implements java.io.Serializable {
	
	public final static String MEMBER_STATUS_ID_UNPAY = "0";
	public final static String MEMBER_STATUS_ID_WAIT_AUDIT = "2";
	public final static String MEMBER_STATUS_ID_AUDIT_SUCCEEDED = "3";
	public final static String MEMBER_STATUS_ID_AUDIT_FAILED = "5";
	public final static String MEMBER_STATUS_ID_NORMAL = "1";
	public final static String MEMBER_STATUS_ID_FROZEN = "4";
	
	public final static String MEMBER_TYPE_ID_BASE = "4";
	public final static String MEMBER_TYPE_ID_MAINTAIN = "6";
	public final static String MEMBER_TYPE_ID_ADVANCE = "7";
	public final static String MEMBER_TYPE_ID_HONOR = "1";
	public final static String MEMBER_TYPE_ID_EXPERIENCE= "0";

	public final static String MEMBER_GENDER_ID_UNKNOWN = "";
	public final static String MEMBER_GENDER_ID_MALE = "1";
	public final static String MEMBER_GENDER_ID_FEMALE = "0";
	
	public final static String MEMBER_CATEGORY_PAY = "1"; //付会费会员
	public final static String MEMBER_CATEGORY_HONOR = "2"; //荣誉会员
	public final static String MEMBER_CATEGORY_EXPERIENCE = "0"; //体验会员

	public final static String MEMBER_PAY_TYPE_ALI = "01"; //支付宝
	public final static String MEMBER_PAY_TYPE_UNION = "02"; //银联
	public final static String MEMBER_PAY_TYPE_POS = "03"; //pos机
	public final static String MEMBER_PAY_TYPE_CASH = "04"; //现金
	
	public final static Map<String, String> MEMBER_STATUS_MAP = new LinkedHashMap<String, String>();	
	public final static Map<String, String> MEMBER_TYPE_MAP = new LinkedHashMap<String, String>();
	public final static Map<String, String> MEMBER_GENDER_MAP = new LinkedHashMap<String, String>();	
	public final static Map<String, String> MEMBER_CARD_ID_PREFIX_MAP = new LinkedHashMap<String, String>();
	public final static Map<String, String> MEMBER_PAY_TYPE_MAP = new LinkedHashMap<String, String>();
	public final static Map<String, String> MEMBER_PAY_STATUS = new LinkedHashMap<String, String>();

	public final static String MEMBER_PAY_REGISTER = "001"; //注册
	public final static String MEMBER_PAY_RECHARGE = "002"; //充值
	public final static String MEMBER_PAY_MEMBERSHIP_FEES = "003"; //消费
	public final static String MEMBER_PAY_CONSUME = "004"; //缴会费


	static {
		MEMBER_STATUS_MAP.put(MEMBER_STATUS_ID_UNPAY, "未缴费");
		MEMBER_STATUS_MAP.put(MEMBER_STATUS_ID_WAIT_AUDIT, "等待审核");
		MEMBER_STATUS_MAP.put(MEMBER_STATUS_ID_AUDIT_SUCCEEDED, "审核通过");
		MEMBER_STATUS_MAP.put(MEMBER_STATUS_ID_AUDIT_FAILED, "审核失败");
		MEMBER_STATUS_MAP.put(MEMBER_STATUS_ID_NORMAL, "正常");
		MEMBER_STATUS_MAP.put(MEMBER_STATUS_ID_FROZEN, "冻结");
		
		MEMBER_TYPE_MAP.put(MEMBER_TYPE_ID_BASE, "健康基本卡会员");
		MEMBER_TYPE_MAP.put(MEMBER_TYPE_ID_MAINTAIN, "健康维护卡会员");
		MEMBER_TYPE_MAP.put(MEMBER_TYPE_ID_ADVANCE, "健康促进卡会员");
		MEMBER_TYPE_MAP.put(MEMBER_TYPE_ID_HONOR, "健康荣誉卡会员");
		MEMBER_TYPE_MAP.put(MEMBER_TYPE_ID_EXPERIENCE, "体验卡会员");

		MEMBER_GENDER_MAP.put(MEMBER_GENDER_ID_UNKNOWN, "未知");
		MEMBER_GENDER_MAP.put(MEMBER_GENDER_ID_MALE, "男");
		MEMBER_GENDER_MAP.put(MEMBER_GENDER_ID_FEMALE, "女");
		
		MEMBER_CARD_ID_PREFIX_MAP.put(MEMBER_TYPE_ID_BASE, "J");
		MEMBER_CARD_ID_PREFIX_MAP.put(MEMBER_TYPE_ID_MAINTAIN, "W");
		MEMBER_CARD_ID_PREFIX_MAP.put(MEMBER_TYPE_ID_ADVANCE, "C");
		MEMBER_CARD_ID_PREFIX_MAP.put(MEMBER_TYPE_ID_EXPERIENCE, "T");

		MEMBER_PAY_TYPE_MAP.put(MEMBER_PAY_TYPE_ALI, "支付宝");
		MEMBER_PAY_TYPE_MAP.put(MEMBER_PAY_TYPE_UNION, "银联");
		MEMBER_PAY_TYPE_MAP.put(MEMBER_PAY_TYPE_POS, "POS机");
		MEMBER_PAY_TYPE_MAP.put(MEMBER_PAY_TYPE_CASH, "现金");

		MEMBER_PAY_STATUS.put(MEMBER_PAY_REGISTER, "注册");
		MEMBER_PAY_STATUS.put(MEMBER_PAY_RECHARGE, "充值");
		MEMBER_PAY_STATUS.put(MEMBER_PAY_MEMBERSHIP_FEES, "消费");
		MEMBER_PAY_STATUS.put(MEMBER_PAY_CONSUME, "缴会费");

	}
	
	private int page;
	private int rows;
	private String sort;
	private String order;
	private String ids;
	private String createTimeStart;
	private String createTimeEnd;
	
	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getRows() {
		return rows;
	}

	public void setRows(int rows) {
		this.rows = rows;
	}

	public String getSort() {
		return sort;
	}

	public void setSort(String sort) {
		this.sort = sort;
	}

	public String getOrder() {
		return order;
	}

	public void setOrder(String order) {
		this.order = order;
	}

	public String getIds() {
		return ids;
	}

	public void setIds(String ids) {
		this.ids = ids;
	}
	
	public String getCreateTimeStart() {
		return createTimeStart;
	}

	public void setCreateTimeStart(String createTimeStart) {
		this.createTimeStart = createTimeStart;
	}
	
	public String getCreateTimeEnd() {
		return createTimeEnd;
	}

	public void setCreateTimeEnd(String createTimeEnd) {
		this.createTimeEnd = createTimeEnd;
	}
	
	private String id = "";
	private String cardId = "";
	private String name = "";
	private String pwd = "";
	private String status = "";
	private String mobile = "";
	private String email = "";
	private String memberType = "";
	private String createTime = "";
	private String gender = "";
	private String cid = ""; //身份证号
	private String bornDate = ""; //出生日期
	private String nation = ""; //民族
	private String nativePlace = ""; //籍贯
	private String profession = "";  //职业
	private String phone = "";       //固定电话
	private double balance;     //消费余额
	private String passportId = "";  //护照号
	private String hkMacTWId = "";   //港澳台证件号
	private String weixin = "";      //微信号
	private String qq = "";          //qq号
	private String address = "";     //联系地址
	private double regCharge;   //注册充值金额
	private String payType = "";
	private double memberFee;   //会费
	private String serialNumber;
	private int jifen;  //积分
	private String pid = ""; //父卡号
	private double recharge; //单次充值金额
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
	
	public String getCardId() {
		return cardId;
	}

	public void setCardId(String cardId) {
		this.cardId = cardId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}
    
	public String getStatus() {
		return this.status;
	}
	
	public String getStatusName() {
		return MEMBER_STATUS_MAP.get(status);
	}
	
	public void setStatus(String status) {
		this.status = status;
	}
	
	public String getMobile() {
		return mobile;
	}
	
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	public String getEmail() {
		return email;
	}
	
	public void setEmail(String email) {
		this.email = email;
	}
	
	public String getMemberType() {
		return this.memberType;
	}
	
	public String getMemberTypeName() {
		return MEMBER_TYPE_MAP.get(memberType);
	}
	
	public void setMemberType(String memberType) {
		this.memberType = memberType;
	}
	
	public String getCreateTime() {
		return createTime;
	}
	
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	
	public String getGender() {
		return this.gender;
	}
	
	public String getGenderName() {
		return MEMBER_GENDER_MAP.get(gender);
	}
	
	public void setGender(String gender) {
		this.gender = gender;
	}
	
	public String getCid() {
		return cid;
	}
	
	public void setCid(String cid) {
		this.cid = cid;
	}
	
	public String getBornDate() {
		return bornDate;
	}
	
	public void setBornDate(String bornDate) {
		this.bornDate = bornDate;
	}
	
	public String getNation() {
		return nation;
	}
	
	public void setNation(String nation) {
		this.nation = nation;
	}
	
	public String getNativePlace() {
		return nativePlace;
	}
	
	public void setNativePlace(String nativePlace) {
		this.nativePlace = nativePlace;
	}
	
	public String getProfession() {
		return profession;
	}
	
	public void setProfession(String profession) {
		this.profession = profession;
	}
	
	public String getPhone() {
		return phone;
	}
	
	public void setPhone(String phone) {
		this.phone = phone;
	}
	
	public double getBalance() {
		return balance;
	}
	
	public void setBalance(double balance) {
		this.balance = balance;
	}
	
	public double getMemberFee() {
		return memberFee;
	}
	
	public void setMemberFee(double memberFee) {
		this.memberFee = memberFee;
	}
	
	public String getPassportId() {
		return passportId;
	}
	
	public void setPassportId(String passportId) {
		this.passportId = passportId;
	}
	
	public String getHkMacTWId() {
		return hkMacTWId;
	}
	
	public void setHkMacTWId(String hkMacTWId) {
		this.hkMacTWId = hkMacTWId;
	}
	
	public String getWeixin() {
		return weixin;
	}
	
	public void setWeixin(String weixin) {
		this.weixin = weixin;
	}
	
	public String getQq() {
		return qq;
	}
	
	public void setQq(String qq) {
		this.qq = qq;
	}
	
	public String getAddress() {
		return address;
	}
	
	public void setAddress(String address) {
		this.address = address;
	}
	
	public double getRegCharge() {
		return this.regCharge;
	}
	
	public void setRegCharge(double regCharge) {
		this.regCharge = regCharge;
	}
	
	public double getRecharge() {
		return this.recharge;
	}
	
	public void setRecharge(double recharge) {
		this.recharge = recharge;
	}
	
	public String getPayType() {
		return this.payType;
	}
	
	public String getPayTypeName() {
		return MEMBER_PAY_TYPE_MAP.get(this.payType);
	}
	
	public void setPayType(String payType) {
		this.payType = payType;
	}
	public String getSerialNumber() {
		return serialNumber;
	}

	public void setSerialNumber(String serialNumber) {
		this.serialNumber = serialNumber;
	}
	
	public int getJifen() {
		return this.jifen;
	}
	
	public void setJifen(int jifen) {
		this.jifen = jifen;
	}
	
	public String getPid() {
		return this.pid;
	}
	
	public void setPid(String pid) {
		this.pid = pid;
	}
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("id='" + id + "', ");
		sb.append("cardId='" + cardId + "', ");
	    sb.append("name='" + name + "', ");
	    sb.append("status='" + status + "', ");
	    sb.append("statusName='" + this.getStatusName() + "', ");
	    sb.append("mobile='" + mobile + "', ");
	    sb.append("email='" + email + "', ");
	    sb.append("memberType='" + memberType + "', ");
	    sb.append("memberTypeName='" + this.getMemberTypeName() + "', ");
	    sb.append("createTime='" + createTime + "', ");
	    sb.append("gender='" + gender + "', ");
	    sb.append("genderName='" + this.getGenderName() + "', ");
	    sb.append("cid='" + cid + "', ");
	    sb.append("bornDate='" + bornDate + "', ");
	    sb.append("nation='" + nation + "', ");
	    sb.append("nativePlace='" + nativePlace + "', ");
	    sb.append("profession='" + profession + "', ");
	    sb.append("phone='" + phone + "', ");
	    sb.append("balance='" + balance + "', ");
	    sb.append("passportId='" + passportId + "', ");
	    sb.append("hkMacTWId='" + hkMacTWId + "', ");
	    sb.append("weixin='" + weixin + "', ");
	    sb.append("qq='" + qq + "', ");
	    sb.append("address='" + address + "', ");
	    sb.append("regCharge='" + regCharge + "', ");
	    sb.append("payType='" + payType + "', ");
	    sb.append("payTypeName='" + this.getPayTypeName() + "', ");
	    sb.append("jifen='" + this.jifen + "', ");
	    sb.append("pid='" + this.pid + "', ");
	    sb.append("recharge=" + recharge + ",");
	    sb.append("memberFee='" + memberFee + "'");
	    return sb.toString();
	}
}
